package com.thoughtworks.tax.printerforamt;

import com.thoughtworks.tax.Receipt;

/**
 * Print the receipt footer
 * @author Tang Ling
 *
 */
public class ReceiptFooterPrinter extends ReceiptPrinter
{

	public ReceiptFooterPrinter(Receipt receipt)
	{
		super(receipt);
	}

	public ReceiptFooterPrinter(ReceiptPrinter printer)
	{
		super(printer);
	}

	@Override
	public void print()
	{
		super.printer.print();
		this.printFooter();
	}

	private void printFooter()
	{
		System.out.println("Sales Tax:" + receipt.getTotalTaxAmount());
		System.out.println("    Total:" + receipt.getTotalPrice());
	}
}
